<?php
class Zend_View_Helper_BookProfile extends Zend_View_Helper_Abstract {
	
    public $view;
    
    public function setView(Zend_View_Interface $view) {
        $this->view = $view;
    }
    
	public function bookProfile($book) {
		$config = Zend_Registry::get('config');
		
		$baseUrl = $config->baseurl;
		if (!empty($book->medium_image)) {
			return "http://".$book->medium_image;
		} else {
			return $baseUrl."/img/no_pic_book.jpg";
		}
	}
}
?>